package com.tv.cms.deviceInfo.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.base.MPJBaseMapper;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.tv.cms.deviceInfo.model.DeviceInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * TODO
 *
 * @author
 * @date
 **/
@Mapper
// @CacheNamespace(implementation= MybatisRedisCache.class,eviction=MybatisRedisCache.class)
public interface DeviceInfoMapper extends MPJBaseMapper<DeviceInfo> {
    Page<DeviceInfo> selectPageList(@Param("page") Page<DeviceInfo> page, @Param(Constants.WRAPPER) Wrapper<DeviceInfo> queryWrapper);

    boolean updateStatus(DeviceInfo deviceInfo);

    List<DeviceInfo> selectDataList(@Param(Constants.WRAPPER) MPJLambdaWrapper<DeviceInfo> wrapper);

    DeviceInfo getById(Integer id);

    int insertModel(DeviceInfo deviceInfo);

    int count(@Param(Constants.WRAPPER) LambdaQueryWrapper<DeviceInfo> wrapper);

    int updateDeviceStatus(DeviceInfo deviceInfo);

    int update(DeviceInfo deviceInfo);
}
